class AshishesController < ApplicationController
  # GET /ashishes
  # GET /ashishes.xml
  def index
    @ashishes = Ashish.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @ashishes }
    end
  end

  # GET /ashishes/1
  # GET /ashishes/1.xml
  def show
    @ashish = Ashish.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @ashish }
    end
  end

  # GET /ashishes/new
  # GET /ashishes/new.xml
  def new
    @ashish = Ashish.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @ashish }
    end
  end

  # GET /ashishes/1/edit
  def edit
    @ashish = Ashish.find(params[:id])
  end

  # POST /ashishes
  # POST /ashishes.xml
  def create
    @ashish = Ashish.new(params[:ashish])

    respond_to do |format|
      if @ashish.save
        format.html { redirect_to(@ashish, :notice => 'Ashish was successfully created.') }
        format.xml  { render :xml => @ashish, :status => :created, :location => @ashish }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @ashish.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /ashishes/1
  # PUT /ashishes/1.xml
  def update
    @ashish = Ashish.find(params[:id])

    respond_to do |format|
      if @ashish.update_attributes(params[:ashish])
        format.html { redirect_to(@ashish, :notice => 'Ashish was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @ashish.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /ashishes/1
  # DELETE /ashishes/1.xml
  def destroy
    @ashish = Ashish.find(params[:id])
    @ashish.destroy

    respond_to do |format|
      format.html { redirect_to(ashishes_url) }
      format.xml  { head :ok }
    end
  end
end
